
 <!DOCTYPE HTML>
<html lang="zh-Hans">
<head>
  <meta charset="UTF-8">
  <!-- Global Site Tag (gtag.js) - Google Analytics -->
  <script async src="https://www.googletagmanager.com/gtag/js?id=UA-84488915-1"></script>
  <script>
  window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());

        gtag('config', 'UA-84488915-1');
  </script>
  
    <title>linyu blog</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no">
    
    <meta name="author" content="linyu">
    

    
    <meta property="og:type" content="website">
<meta property="og:title" content="linyu blog">
<meta property="og:url" content="http://bigsuperangel.github.io/page/5/index.html">
<meta property="og:site_name" content="linyu blog">
<meta property="og:locale" content="zh-Hans">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="linyu blog">

    
    <link rel="alternative" href="/atom.xml" title="linyu blog" type="application/atom+xml">
    
    
    <link rel="icon" href="/img/favicon.ico">
    
    
    <link rel="apple-touch-icon" href="/img/jacman.jpg">
    <link rel="apple-touch-icon-precomposed" href="/img/jacman.jpg">
    
    <link rel="stylesheet" href="/css/style.css">
</head>

  <body>
    <header>
      
<div>
		
			<div id="imglogo">
				<a href="/"><img src="/img/logo.png" alt="linyu blog" title="linyu blog"/></a>
			</div>
			
			<div id="textlogo">
				<h1 class="site-name"><a href="/" title="linyu blog">linyu blog</a></h1>
				<h2 class="blog-motto">Where there is a will,there is a way</h2>
			</div>
			<div class="navbar"><a class="navbutton navmobile" href="#" title="菜單">
			</a></div>
			<nav class="animated">
				<ul>
					<ul>
					 
						<li><a href="/">Home</a></li>
					
						<li><a href="/archives">Archives</a></li>
					
						<li><a href="/tags/linux">linux</a></li>
					
						<li><a href="/tags/java">Java</a></li>
					
					<li>
 					
					<form class="search" action="//google.com/search" method="get" accept-charset="utf-8">
						<label>Search</label>
						<input type="search" id="search" name="q" autocomplete="off" maxlength="20" placeholder="搜索" />
						<input type="hidden" name="q" value="site:bigsuperangel.github.io">
					</form>
					
					</li>
				</ul>
			</nav>			
</div>
    </header>
    <div id="container">
      <div id="main">

   
    
    <article class="post-expand post" itemprop="articleBody"> 
        <header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/2016/05/13/springboot-devtools/" title="spring配置springboot-devtools来实现热启动" itemprop="url">spring配置springboot-devtools来实现热启动</a>
  </h1>
  <p class="article-author">By
       
		<a href="/about" title="linyu" target="_blank" itemprop="author">linyu</a>
		
  <p class="article-time">
    <time datetime="2016-05-13T06:26:49.000Z" itemprop="datePublished"> 發表於 2016-05-13</time>
    
  </p>
</header>
    <div class="article-content">
        
        <figure class="highlight xml"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div></pre></td><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">build</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">finalName</span>&gt;</span>boot-web<span class="tag">&lt;/<span class="name">finalName</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">plugins</span>&gt;</span></div><div class="line">        <span class="tag">&lt;<span class="name">plugin</span>&gt;</span></div><div class="line">            <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework.boot<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></div><div class="line">            <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-boot-maven-plugin<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></div><div class="line">            <span class="tag">&lt;<span class="name">configuration</span>&gt;</span></div><div class="line">                <span class="tag">&lt;<span class="name">fork</span>&gt;</span>true<span class="tag">&lt;/<span class="name">fork</span>&gt;</span></div><div class="line">                <span class="tag">&lt;<span class="name">mainClass</span>&gt;</span>org.boot.web.Application<span class="tag">&lt;/<span class="name">mainClass</span>&gt;</span></div><div class="line">                <span class="tag">&lt;<span class="name">layout</span>&gt;</span>ZIP<span class="tag">&lt;/<span class="name">layout</span>&gt;</span></div><div class="line">            <span class="tag">&lt;/<span class="name">configuration</span>&gt;</span></div><div class="line">            <span class="tag">&lt;<span class="name">executions</span>&gt;</span></div><div class="line">                <span class="tag">&lt;<span class="name">execution</span>&gt;</span></div><div class="line">                    <span class="tag">&lt;<span class="name">goals</span>&gt;</span></div><div class="line">                        <span class="tag">&lt;<span class="name">goal</span>&gt;</span>repackage<span class="tag">&lt;/<span class="name">goal</span>&gt;</span></div><div class="line">                    <span class="tag">&lt;/<span class="name">goals</span>&gt;</span></div><div class="line">                <span class="tag">&lt;/<span class="name">execution</span>&gt;</span></div><div class="line">            <span class="tag">&lt;/<span class="name">executions</span>&gt;</span></div><div class="line">        <span class="tag">&lt;/<span class="name">plugin</span>&gt;</span></div><div class="line">    <span class="tag">&lt;/<span class="name">plugins</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">build</span>&gt;</span></div></pre></td></tr></table></figure>
<h6 id="springboot-devtools需要配置fock-为true才能正常运行"><a href="#springboot-devtools需要配置fock-为true才能正常运行" class="headerlink" title="springboot devtools需要配置fock 为true才能正常运行"></a>springboot devtools需要配置fock 为true才能正常运行</h6><figure class="highlight dockerfile"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">spring-boot :<span class="keyword">run</span><span class="bash"></span></div></pre></td></tr></table></figure>

        
        
        <p class="article-more-link">
          
       </p>
    </div>
    <footer class="article-footer clearfix">
<div class="article-catetags">


  <div class="article-tags">
  
  <span></span> <a href="/tags/java/">java</a><a href="/tags/ubuntu/">ubuntu</a><a href="/tags/linux/">linux</a><a href="/tags/springboot/">springboot</a><a href="/tags/devtools/">devtools</a>
  </div>

</div>




<div class="comments-count">
	
	  	<span></span>
		<a href="/2016/05/13/springboot-devtools/#comments" class="ds-thread-count comments-count-link" data-thread-key="2016/05/13/springboot-devtools/" data-count-type="comments">&nbsp;</a>
	
</div>

</footer>


    </article>






   
    
    <article class="post-expand post" itemprop="articleBody"> 
        <header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/2016/05/13/openjdk8/" title="ubuntu15 以下安装 openjdk8" itemprop="url">ubuntu15 以下安装 openjdk8</a>
  </h1>
  <p class="article-author">By
       
		<a href="/about" title="linyu" target="_blank" itemprop="author">linyu</a>
		
  <p class="article-time">
    <time datetime="2016-05-13T06:21:40.000Z" itemprop="datePublished"> 發表於 2016-05-13</time>
    
  </p>
</header>
    <div class="article-content">
        
        <ul>
<li><p>If you really want to use OpenJDK, you have to compile from source. There is not still any PPA for OpenJDK. It has been requested at  <a href="https://bugs.launchpad.net/ubuntu/+bug/1297065" target="_blank" rel="external">https://bugs.launchpad.net/ubuntu/+bug/1297065</a></p>
</li>
<li><p><strong>I recommend you to use Webup8 Oracle Java8 Installer</strong></p>
</li>
</ul>
<figure class="highlight smali"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">sudo<span class="built_in"> add-apt-repository </span>ppa:webupd8team/java -y</div><div class="line">sudo apt-get update</div><div class="line">sudo apt-get install oracle-java8-installer</div></pre></td></tr></table></figure>
<ul>
<li>To automatically set up the Java 8 environment variables</li>
</ul>
<figure class="highlight sql"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">sudo apt-get <span class="keyword">install</span> <span class="keyword">oracle</span>-java8-<span class="keyword">set</span>-<span class="keyword">default</span></div></pre></td></tr></table></figure>
<ul>
<li>Check it</li>
</ul>
<figure class="highlight applescript"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">java -<span class="built_in">version</span></div></pre></td></tr></table></figure>
<h5 id="So-you-have-to-wait-to-use-OpenJDK8"><a href="#So-you-have-to-wait-to-use-OpenJDK8" class="headerlink" title="So you have to wait to use OpenJDK8"></a>So you have to wait to use OpenJDK8</h5>
        
        
        <p class="article-more-link">
          
       </p>
    </div>
    <footer class="article-footer clearfix">
<div class="article-catetags">


  <div class="article-tags">
  
  <span></span> <a href="/tags/ubuntu/">ubuntu</a><a href="/tags/openjdk8/">openjdk8</a>
  </div>

</div>




<div class="comments-count">
	
	  	<span></span>
		<a href="/2016/05/13/openjdk8/#comments" class="ds-thread-count comments-count-link" data-thread-key="2016/05/13/openjdk8/" data-count-type="comments">&nbsp;</a>
	
</div>

</footer>


    </article>






   
    
    <article class="post-expand post" itemprop="articleBody"> 
        <header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/2016/05/06/nginx/" title="nginx相关配置" itemprop="url">nginx相关配置</a>
  </h1>
  <p class="article-author">By
       
		<a href="/about" title="linyu" target="_blank" itemprop="author">linyu</a>
		
  <p class="article-time">
    <time datetime="2016-05-06T03:22:30.000Z" itemprop="datePublished"> 發表於 2016-05-06</time>
    
  </p>
</header>
    <div class="article-content">
        
        <blockquote>
<p>nginx 配置80端口转向，间接启用tomcat，不需要用authbind</p>
</blockquote>
<figure class="highlight nginx"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div></pre></td><td class="code"><pre><div class="line"><span class="section">server</span> &#123;</div><div class="line">  <span class="attribute">listen</span> <span class="number">80</span>;</div><div class="line">  <span class="attribute">server_name</span> bigsuperangel.ngrok.cc;  <span class="comment"># 写上你的虚拟主机域名</span></div><div class="line"></div><div class="line">  <span class="attribute">location</span> /&#123;</div><div class="line">    <span class="attribute">proxy_pass</span> http://127.0.0.1:8080/;  <span class="comment"># 写上要转发到的地址，可以是http也可以是https，注意不要遗漏了最后的斜杠</span></div><div class="line">    <span class="attribute">proxy_pass_header</span> Set-Cookie;                           <span class="comment"># 带cookie转发</span></div><div class="line">    <span class="attribute">proxy_set_header</span> Host <span class="variable">$host</span>;</div><div class="line">    <span class="attribute">proxy_set_header</span> X-Real-IP <span class="variable">$remote_addr</span>;</div><div class="line">    <span class="attribute">proxy_set_header</span> X-Forwarded-For <span class="variable">$proxy_add_x_forwarded_for</span>;</div><div class="line"></div><div class="line">  &#125;</div><div class="line">&#125;</div></pre></td></tr></table></figure>

        
        
        <p class="article-more-link">
          
       </p>
    </div>
    <footer class="article-footer clearfix">
<div class="article-catetags">


  <div class="article-tags">
  
  <span></span> <a href="/tags/linux/">linux</a><a href="/tags/nginx/">nginx</a>
  </div>

</div>




<div class="comments-count">
	
	  	<span></span>
		<a href="/2016/05/06/nginx/#comments" class="ds-thread-count comments-count-link" data-thread-key="2016/05/06/nginx/" data-count-type="comments">&nbsp;</a>
	
</div>

</footer>


    </article>






   
    
    <article class="post-expand post" itemprop="articleBody"> 
        <header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/2016/05/06/ubuntu-tomcat-80/" title="Ubuntu下Tomcat绑定80端口" itemprop="url">Ubuntu下Tomcat绑定80端口</a>
  </h1>
  <p class="article-author">By
       
		<a href="/about" title="linyu" target="_blank" itemprop="author">linyu</a>
		
  <p class="article-time">
    <time datetime="2016-05-06T03:12:09.000Z" itemprop="datePublished"> 發表於 2016-05-06</time>
    
  </p>
</header>
    <div class="article-content">
        
        <blockquote>
<p>工作环境迁移到了Ubuntu,很多东西发生了变化,比如原先配置tomcat端口.只需要配置server.xml文件就可以了。但是在Ubuntu下，只修改了server.xml文件后发现无法访问到服务。起初以为是有别的进程占用了80端口，但是通过netstat -an | grep 80后并没有发现有进程在占用80,Google了一下，发现tomcat使用1023以下的端口时需要使用authbind来指定。</p>
</blockquote>
<ul>
<li><p>authbind是GNU下的一个小工具，用于帮助系统管理员来为程序指定端口。如果你的机器没有安装authbind,那么首先要安装才可以: </p>
<figure class="highlight routeros"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">sudo apt-<span class="builtin-name">get</span> install authbind</div></pre></td></tr></table></figure>
</li>
<li><p>然后配置80端口: </p>
<figure class="highlight awk"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">sudo touch <span class="regexp">/etc/</span>authbind<span class="regexp">/byport/</span><span class="number">80</span></div></pre></td></tr></table></figure>
</li>
<li><p>接下来再启动tomcat就可以访问到80的服务了:</p>
<figure class="highlight jboss-cli"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">sudo authbind <span class="params">--deep</span> <span class="string">./catalina.sh</span> start</div></pre></td></tr></table></figure>
</li>
<li><p>测试是否运行</p>
<figure class="highlight 1c"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">sudo netstat -lnp <span class="string">| grep 80</span></div></pre></td></tr></table></figure>
</li>
</ul>
<blockquote>
<p>Enjoy Youself</p>
</blockquote>

        
        
        <p class="article-more-link">
          
       </p>
    </div>
    <footer class="article-footer clearfix">
<div class="article-catetags">


  <div class="article-tags">
  
  <span></span> <a href="/tags/tomcat/">tomcat</a><a href="/tags/authbind/">authbind</a>
  </div>

</div>




<div class="comments-count">
	
	  	<span></span>
		<a href="/2016/05/06/ubuntu-tomcat-80/#comments" class="ds-thread-count comments-count-link" data-thread-key="2016/05/06/ubuntu-tomcat-80/" data-count-type="comments">&nbsp;</a>
	
</div>

</footer>


    </article>






   
    
    <article class="post-expand post" itemprop="articleBody"> 
        <header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/2016/05/04/ntpdate/" title="ntpdate时间同步" itemprop="url">ntpdate时间同步</a>
  </h1>
  <p class="article-author">By
       
		<a href="/about" title="linyu" target="_blank" itemprop="author">linyu</a>
		
  <p class="article-time">
    <time datetime="2016-05-04T03:59:05.000Z" itemprop="datePublished"> 發表於 2016-05-04</time>
    
  </p>
</header>
    <div class="article-content">
        
        <ol>
<li><p>安装ntpdate工具</p>
<figure class="highlight routeros"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">sudo apt-<span class="builtin-name">get</span> install ntpdate</div></pre></td></tr></table></figure>
</li>
<li><p>设置系统时间与网络时间同步</p>
<figure class="highlight stylus"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">ntpdate cn<span class="selector-class">.pool</span><span class="selector-class">.ntp</span><span class="selector-class">.org</span></div></pre></td></tr></table></figure>
</li>
<li><p>将系统时间写入硬件时间</p>
<figure class="highlight nginx"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line"><span class="attribute">hwclock</span> –systohc</div></pre></td></tr></table></figure>
</li>
</ol>

        
        
        <p class="article-more-link">
          
       </p>
    </div>
    <footer class="article-footer clearfix">
<div class="article-catetags">


  <div class="article-tags">
  
  <span></span> <a href="/tags/ubuntu/">ubuntu</a><a href="/tags/ntpdate/">ntpdate</a>
  </div>

</div>




<div class="comments-count">
	
	  	<span></span>
		<a href="/2016/05/04/ntpdate/#comments" class="ds-thread-count comments-count-link" data-thread-key="2016/05/04/ntpdate/" data-count-type="comments">&nbsp;</a>
	
</div>

</footer>


    </article>






   
    
    <article class="post-expand post" itemprop="articleBody"> 
        <header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/2016/05/04/screen/" title="screen 使用教程" itemprop="url">screen 使用教程</a>
  </h1>
  <p class="article-author">By
       
		<a href="/about" title="linyu" target="_blank" itemprop="author">linyu</a>
		
  <p class="article-time">
    <time datetime="2016-05-04T02:57:53.000Z" itemprop="datePublished"> 發表於 2016-05-04</time>
    
  </p>
</header>
    <div class="article-content">
        
        <p>　　在刚接触Linux时最怕的就是SSH远程登录Linux VPS编译安装程序时网络突然断开，或者其他情况导致不得不与远程SSH服务器链接断开，远程执行的命令也被迫停止，只能重新连接，重新运行。Screen是一个可以在多个进程之间多路复用一个物理终端的全屏窗口管理器。Screen中有会话的概念，用户可以在一个screen会话中创建多个screen窗口，在每一个screen窗口中就像操作一个真实的telnet/SSH连接窗口那样。</p>
<h3 id="一、screen命令是什么？"><a href="#一、screen命令是什么？" class="headerlink" title="一、screen命令是什么？"></a>一、screen命令是什么？</h3><p>Screen是一个可以在多个进程之间多路复用一个物理终端的全屏窗口管理器。Screen中有会话的概念，用户可以在一个screen会话中创建多个screen窗口，在每一个screen窗口中就像操作一个真实的telnet/SSH连接窗口那样。</p>
<h3 id="二、如何安装screen命令？"><a href="#二、如何安装screen命令？" class="headerlink" title="二、如何安装screen命令？"></a>二、如何安装screen命令？</h3><p>除部分精简的系统或者定制的系统大部分都安装了screen命令，如果没有安装，<br>CentOS系统可以执行：yum install screen ；<br>Debian/Ubuntu系统执行：apt-get install screen 。</p>
<h3 id="三、screen命令使用方法？"><a href="#三、screen命令使用方法？" class="headerlink" title="三、screen命令使用方法？"></a>三、screen命令使用方法？</h3><h4 id="1、-常用的使用方法"><a href="#1、-常用的使用方法" class="headerlink" title="1、 常用的使用方法"></a>1、 常用的使用方法</h4><p>用来解决文章开始我们遇到的问题，比如在安装lnmp时。</p>
<h5 id="1-1-创建screen会话"><a href="#1-1-创建screen会话" class="headerlink" title="1.1 创建screen会话"></a>1.1 创建screen会话</h5><figure class="highlight ebnf"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line"><span class="attribute">screen -S ngrok</span></div></pre></td></tr></table></figure>
<p>可以先执行：screen -S lnmp ，screen就会创建一个名字为lnmp的会话。</p>
<h5 id="1-2-暂时离开，保留screen会话中的任务或程序"><a href="#1-2-暂时离开，保留screen会话中的任务或程序" class="headerlink" title="1.2 暂时离开，保留screen会话中的任务或程序"></a>1.2 暂时离开，保留screen会话中的任务或程序</h5><figure class="highlight stylus"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">Ctrl+<span class="selector-tag">a</span> d</div></pre></td></tr></table></figure>
<p>当需要临时离开时（会话中的程序不会关闭，仍在运行）可以用快捷键Ctrl+a d(即按住Ctrl，依次再按a,d)</p>
<h5 id="1-3-恢复screen会话"><a href="#1-3-恢复screen会话" class="headerlink" title="1.3 恢复screen会话"></a>1.3 恢复screen会话</h5><figure class="highlight routeros"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">screen -ls </div><div class="line">screen -r ngrok</div></pre></td></tr></table></figure>
<p>当回来时可以再执行执行：screen -r lnmp 即可恢复到离开前创建的lnmp会话的工作界面。如果忘记了，或者当时没有指定会话名，可以执行：screen -ls screen会列出当前存在的会话列表：<br>11791.lnmp即为刚才的screen创建的lnmp会话，目前已经暂时退出了lnmp会话，所以状态为Detached，当使用screen -r lnmp后状态就会变为Attached，11791是这个screen的会话的进程ID，恢复会话时也可以使用：screen -r 11791</p>
<h5 id="1-4-关闭screen的会话"><a href="#1-4-关闭screen的会话" class="headerlink" title="1.4 关闭screen的会话"></a>1.4 关闭screen的会话</h5><figure class="highlight awk"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line"><span class="keyword">exit</span></div></pre></td></tr></table></figure>
<p>执行：exit ，会提示：[screen is terminating]，表示已经成功退出screen会话。VPS侦探 <a href="http://www.vpser.net/" target="_blank" rel="external">http://www.vpser.net/</a></p>
<h4 id="2、-远程演示"><a href="#2、-远程演示" class="headerlink" title="2、 远程演示"></a>2、 远程演示</h4><figure class="highlight routeros"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">screen -S test</div><div class="line">screen -x test</div></pre></td></tr></table></figure>
<p>首先演示者先在服务器上执行 screen -S test 创建一个screen会话，观众可以链接到远程服务器上执行screen -x test 观众屏幕上就会出现和演示者同步。</p>
<h4 id="3、常用快捷键"><a href="#3、常用快捷键" class="headerlink" title="3、常用快捷键"></a>3、常用快捷键</h4><figure class="highlight stylus"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line">Ctrl+<span class="selector-tag">a</span> c ：在当前screen会话中创建窗口</div><div class="line">Ctrl+<span class="selector-tag">a</span> w ：窗口列表</div><div class="line">Ctrl+<span class="selector-tag">a</span> n ：下一个窗口</div><div class="line">Ctrl+<span class="selector-tag">a</span> <span class="selector-tag">p</span> ：上一个窗口</div><div class="line">Ctrl+<span class="selector-tag">a</span> <span class="number">0</span>-<span class="number">9</span> ：在第<span class="number">0</span>个窗口和第<span class="number">9</span>个窗口之间切换</div></pre></td></tr></table></figure>

        
        
        <p class="article-more-link">
          
       </p>
    </div>
    <footer class="article-footer clearfix">
<div class="article-catetags">


  <div class="article-tags">
  
  <span></span> <a href="/tags/linux/">linux</a><a href="/tags/screen/">screen</a>
  </div>

</div>




<div class="comments-count">
	
	  	<span></span>
		<a href="/2016/05/04/screen/#comments" class="ds-thread-count comments-count-link" data-thread-key="2016/05/04/screen/" data-count-type="comments">&nbsp;</a>
	
</div>

</footer>


    </article>






   
    
    <article class="post-expand post" itemprop="articleBody"> 
        <header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/2016/04/22/doc/" title="doc命令大全" itemprop="url">doc命令大全</a>
  </h1>
  <p class="article-author">By
       
		<a href="/about" title="linyu" target="_blank" itemprop="author">linyu</a>
		
  <p class="article-time">
    <time datetime="2016-04-22T06:22:46.000Z" itemprop="datePublished"> 發表於 2016-04-22</time>
    
  </p>
</header>
    <div class="article-content">
        
        <h3 id="一"><a href="#一" class="headerlink" title="一"></a>一</h3><figure class="highlight routeros"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div><div class="line">34</div><div class="line">35</div><div class="line">36</div><div class="line">37</div><div class="line">38</div><div class="line">39</div><div class="line">40</div><div class="line">41</div><div class="line">42</div></pre></td><td class="code"><pre><div class="line">net use \\ip\ipc$ <span class="string">" "</span> /user:<span class="string">" "</span> 建立IPC空链接 </div><div class="line">net use \\ip\ipc$ <span class="string">"密码"</span> /user:<span class="string">"用户名"</span> 建立IPC非空链接 </div><div class="line">net use h: \\ip\c$ <span class="string">"密码"</span> /user:<span class="string">"用户名"</span> 直接登陆后映射对方C：到本地为H: </div><div class="line">net use h: \\ip\c$ 登陆后映射对方C：到本地为H: </div><div class="line">net use \\ip\ipc$ /del 删除IPC链接 </div><div class="line">net use h: /del 删除映射对方到本地的为H:的映射 </div><div class="line">net<span class="built_in"> user </span>用户名　密码　/<span class="builtin-name">add</span> 建立用户 </div><div class="line">net<span class="built_in"> user </span>guest /active:yes 激活guest用户 </div><div class="line">net<span class="built_in"> user </span>查看有哪些用户 </div><div class="line">net<span class="built_in"> user </span>帐户名 查看帐户的属性 </div><div class="line">net localgroup administrators 用户名 /<span class="builtin-name">add</span> 把<span class="string">"用户"</span>添加到管理员中使其具有管理员权限,注意：administrator后加s用复数 </div><div class="line">net start 查看开启了哪些服务 </div><div class="line">net start 服务名　 开启服务；(如:net start telnet， net start schedule) </div><div class="line">net stop 服务名 停止某服务 </div><div class="line">net time \\目标ip 查看对方时间 </div><div class="line">net time \\目标ip /<span class="builtin-name">set</span> 设置本地计算机时间与<span class="string">"目标IP"</span>主机的时间同步,加上参数/<span class="literal">yes</span>可取消确认信息 </div><div class="line">net view 查看本地局域网内开启了哪些共享 </div><div class="line">net view \\ip 查看对方局域网内开启了哪些共享 </div><div class="line">net<span class="built_in"> config </span>显示系统网络设置 </div><div class="line">net logoff 断开连接的共享 </div><div class="line">net pause 服务名 暂停某服务 </div><div class="line">net send<span class="built_in"> ip </span><span class="string">"文本信息"</span> 向对方发信息 </div><div class="line">net ver 局域网内正在使用的网络连接类型和信息 </div><div class="line">net share 查看本地开启的共享 </div><div class="line">net share ipc$ 开启ipc$共享 </div><div class="line">net share ipc$ /del 删除ipc$共享 </div><div class="line">net share c$ /del 删除C：共享 </div><div class="line">net<span class="built_in"> user </span>guest 12345 用guest用户登陆后用将密码改为12345 </div><div class="line">net password 密码 更改系统登陆密码 </div><div class="line">netstat -a 查看开启了哪些端口,常用netstat -an </div><div class="line">netstat -n 查看端口的网络连接情况，常用netstat -an </div><div class="line">netstat -v 查看正在进行的工作 </div><div class="line">netstat -p 协议名 例：netstat -p tcq<span class="built_in">/ip </span>查看某协议使用情况（查看tcp/ip协议使用情况） </div><div class="line">netstat -s 查看正在使用的所有协议使用情况 </div><div class="line">nbtstat -A<span class="built_in"> ip </span>对方136到139其中一个端口开了的话，就可查看对方最近登陆的用户名（03前的为用户名）-注意：参数-A要大写 </div><div class="line">tracert -参数 ip(或计算机名) 跟踪路由（数据包），参数：<span class="string">"-w数字"</span>用于设置超时间隔。 </div><div class="line">ping ip(或域名) 向对方主机发送默认大小为32字节的数据，参数：<span class="string">"-l[空格]数据包大小"</span>；<span class="string">"-n发送数据次数"</span>；<span class="string">"-t"</span>指一直ping。 </div><div class="line">ping -t -l 65550<span class="built_in"> ip </span>死亡之ping(发送大于64K的文件并一直ping就成了死亡之ping) </div><div class="line">ipconfig (winipcfg) 用于windows NT及XP(windows 95 98)查看本地ip地址，ipconfig可用参数<span class="string">"/all"</span>显示全部配置信息 </div><div class="line">tlist -t 以树行列表显示进程(为系统的附加工具，默认是没有安装的，在安装目录的Support/tools文件夹内) </div><div class="line">kill -F 进程名 加-F参数后强制结束某进程(为系统的附加工具，默认是没有安装的，在安装目录的Support/tools文件夹内) </div><div class="line">del -F 文件名 加-F参数后就可删除只读文件,/AR、/AH、/AS、/AA分别表示删除只读、隐藏、系统、存档文件，/A-R、/A-H、/A-S、/A-A表示删除除只读、隐藏、系统、存档以外的文件。例如<span class="string">"DEL/AR *.*"</span>表示删除当前目录下所有只读文件，<span class="string">"DEL/A-S *.*"</span>表示删除当前目录下除系统文件以外的所有文件</div></pre></td></tr></table></figure>
<h3 id="二"><a href="#二" class="headerlink" title="二"></a>二</h3><figure class="highlight routeros"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div><div class="line">34</div><div class="line">35</div><div class="line">36</div><div class="line">37</div><div class="line">38</div><div class="line">39</div><div class="line">40</div><div class="line">41</div><div class="line">42</div><div class="line">43</div><div class="line">44</div></pre></td><td class="code"><pre><div class="line">del /S /Q 目录 或用：rmdir /s /Q 目录 /S删除目录及目录下的所有子目录和文件。同时使用参数/Q 可取消删除操作时的系统确认就直接删除。（二个命令作用相同） </div><div class="line">move 盘符\路径\要移动的文件名　存放移动文件的路径\移动后文件名 移动文件,用参数/y将取消确认移动目录存在相同文件的提示就直接覆盖 </div><div class="line">fc one.txt two.txt &gt; 3st.txt 对比二个文件并把不同之处输出到3st.txt文件中，<span class="string">"&gt; "</span>和<span class="string">"&gt; &gt;"</span> 是重定向命令 </div><div class="line">at id号 开启已注册的某个计划任务 </div><div class="line">at /delete 停止所有计划任务，用参数/<span class="literal">yes</span>则不需要确认就直接停止 </div><div class="line">at id号 /delete 停止某个已注册的计划任务 </div><div class="line">at 查看所有的计划任务 </div><div class="line">at \\ip time 程序名(或一个命令) /r 在某时间运行对方某程序并重新启动计算机 </div><div class="line">finger username @host 查看最近有哪些用户登陆 </div><div class="line">telnet<span class="built_in"> ip </span>端口 远和登陆服务器,默认端口为23 </div><div class="line">open<span class="built_in"> ip </span>连接到IP（属telnet登陆后的命令） </div><div class="line">telnet 在本机上直接键入telnet 将进入本机的telnet </div><div class="line">copy 路径\文件名1　路径\文件名2 /y 复制文件1到指定的目录为文件2，用参数/y就同时取消确认你要改写一份现存目录文件 </div><div class="line">copy c:\srv.exe \\ip\admin$ 复制本地c:\srv.exe到对方的admin下 </div><div class="line">cppy 1st.jpg/b+2st.txt/a 3st.jpg 将2st.txt的内容藏身到1st.jpg中生成3st.jpg新的文件，注：2st.txt文件头要空三排，参数：/b指二进制文件，/a指ASCLL格式文件 </div><div class="line">copy \\ip\admin$\svv.exe c:\ 或:copy\\ip\admin$\*.* 复制对方admini$共享下的srv.exe文件（所有文件）至本地C：</div><div class="line">xcopy 要复制的文件或目录树　目标地址\目录名 复制文件和目录树，用参数/Y将不提示覆盖相同文件 </div><div class="line">tftp -i 自己IP(用肉机作跳板时这用肉机IP) <span class="builtin-name">get</span> server.exe c:\server.exe 登陆后，将<span class="string">"IP"</span>的server.exe下载到目标主机c:\server.exe 参数：-i指以二进制模式传送，如传送exe文件时用，如不加-i 则以ASCII模式（传送文本文件模式）进行传送 </div><div class="line">tftp -i 对方IP　put c:\server.exe 登陆后，上传本地c:\server.exe至主机 </div><div class="line">ftp<span class="built_in"> ip </span>端口 用于上传文件至服务器或进行文件操作，默认端口为21。bin指用二进制方式传送（可执行文件进）；默认为ASCII格式传送(文本文件时) </div><div class="line">route <span class="builtin-name">print</span> 显示出IP路由，将主要显示网络地址Network addres，子网掩码Netmask，网关地址Gateway addres，接口地址Interface </div><div class="line">arp 查看和处理ARP缓存，ARP是名字解析的意思，负责把一个IP解析成一个物理性的MAC地址。arp -a将显示出全部信息 </div><div class="line">start 程序名或命令 /max 或/min 新开一个新窗口并最大化（最小化）运行某程序或命令 </div><div class="line">mem 查看cpu使用情况 </div><div class="line">attrib 文件名(目录名) 查看某文件（目录）的属性 </div><div class="line">attrib 文件名 -A -R -S -H 或 +A +R +S +H 去掉(添加)某文件的 存档，只读，系统，隐藏 属性；用＋则是添加为某属性 </div><div class="line">dir 查看文件，参数：/Q显示文件及目录属系统哪个用户，/T:C显示文件创建时间，/T:A显示文件上次被访问时间，/T:W上次被修改时间 </div><div class="line">date /t 、 time /t 使用此参数即<span class="string">"DATE/T"</span>、<span class="string">"TIME/T"</span>将只显示当前日期和时间，而不必输入新日期和时间 </div><div class="line"><span class="builtin-name">set</span> 指定环境变量名称=要指派给变量的字符 设置环境变量 </div><div class="line"><span class="builtin-name">set</span> 显示当前所有的环境变量 </div><div class="line"><span class="builtin-name">set</span> p(或其它字符) 显示出当前以字符p(或其它字符)开头的所有环境变量 </div><div class="line">pause 暂停批处理程序，并显示出：请按任意键继续<span class="built_in">..</span><span class="built_in">..</span> </div><div class="line"><span class="keyword">if</span> 在批处理程序中执行条件处理（更多说明见<span class="keyword">if</span>命令及变量） </div><div class="line">goto 标签 将cmd.exe导向到批处理程序中带标签的行（标签必须单独一行，且以冒号打头，例如：<span class="string">"：start"</span>标签）</div><div class="line">call 路径\批处理文件名 从批处理程序中调用另一个批处理程序 （更多说明见call /?） </div><div class="line"><span class="keyword">for</span> 对一组文件中的每一个文件执行某个特定命令（更多说明见<span class="keyword">for</span>命令及变量） </div><div class="line">echo on或off 打开或关闭echo，仅用echo不加参数则显示当前echo设置 </div><div class="line">echo 信息 在屏幕上显示出信息 </div><div class="line">echo 信息 &gt;&gt; pass.txt 将<span class="string">"信息"</span>保存到pass.txt文件中 </div><div class="line">findstr <span class="string">"Hello"</span> aa.txt 在aa.txt文件中寻找字符串hello </div><div class="line"><span class="builtin-name">find</span> 文件名 查找某文件 </div><div class="line">title 标题名字 更改CMD窗口标题名字 </div><div class="line">color 颜色值 设置cmd控制台前景和背景颜色；0＝黑、1＝蓝、2＝绿、3＝浅绿、4＝红、5＝紫、6＝黄、<span class="attribute">7</span>=白、8=灰、9=淡蓝、A＝淡绿、B=淡浅绿、C=淡红、D=淡紫、E=淡黄、F=亮白 </div><div class="line">prompt 名称 更改cmd.exe的显示的命令提示符(把C:\、D:\统一改为：EntSky\ )</div></pre></td></tr></table></figure>
<h3 id="三"><a href="#三" class="headerlink" title="三"></a>三</h3><figure class="highlight dos"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div></pre></td><td class="code"><pre><div class="line"><span class="built_in">ver</span> 在DOS窗口下显示版本信息 </div><div class="line">winver 弹出一个窗口显示版本信息（内存大小、系统版本、补丁版本、计算机名） </div><div class="line"><span class="built_in">format</span> 盘符 /<span class="built_in">FS</span>:类型 格式化磁盘,类型:FAT、FAT32、NTFS ,例：<span class="built_in">Format</span> D: /<span class="built_in">FS</span>:NTFS </div><div class="line"><span class="built_in">md</span>　目录名 创建目录 </div><div class="line"><span class="built_in">replace</span> 源文件　要替换文件的目录 替换文件 </div><div class="line"><span class="built_in">ren</span> 原文件名　新文件名 重命名文件名 </div><div class="line"><span class="built_in">tree</span> 以树形结构显示出目录，用参数-f 将列出第个文件夹中文件名称 </div><div class="line"><span class="built_in">type</span> 文件名 显示文本文件的内容 </div><div class="line"><span class="built_in">more</span> 文件名 逐屏显示输出文件 </div><div class="line"><span class="built_in">doskey</span> 要锁定的命令＝字符 </div><div class="line"><span class="built_in">doskey</span> 要解锁命令= 为DOS提供的锁定命令(编辑命令行，重新调用win2k命令，并创建宏)。如：锁定<span class="built_in">dir</span>命令：<span class="built_in">doskey</span> <span class="built_in">dir</span>=entsky (不能用<span class="built_in">doskey</span> <span class="built_in">dir</span>=<span class="built_in">dir</span>)；解锁：<span class="built_in">doskey</span> <span class="built_in">dir</span>= </div><div class="line">taskmgr 调出任务管理器 </div><div class="line"><span class="built_in">chkdsk</span> /F D: 检查磁盘D并显示状态报告；加参数/f并修复磁盘上的错误 </div><div class="line">tlntadmn telnt服务admn,键入tlntadmn选择<span class="number">3</span>，再选择<span class="number">8</span>,就可以更改telnet服务默认端口<span class="number">23</span>为其它任何端口 </div><div class="line"><span class="keyword">exit</span> 退出<span class="built_in">cmd</span>.exe程序或目前，用参数/B则是退出当前批处理脚本而不是<span class="built_in">cmd</span>.exe </div><div class="line"><span class="built_in">path</span> 路径\可执行文件的文件名 为可执行文件设置一个路径。 </div><div class="line"><span class="built_in">cmd</span> 启动一个win2K命令解释窗口。参数：/eff、/en 关闭、开启命令扩展；更我详细说明见<span class="built_in">cmd</span> /? </div><div class="line">regedit /s 注册表文件名 导入注册表；参数/S指安静模式导入，无任何提示； </div><div class="line">regedit /e 注册表文件名 导出注册表 </div><div class="line"><span class="built_in">cacls</span> 文件名　参数 显示或修改文件访问控制列表（ACL）——针对NTFS格式时。参数：/D 用户名:设定拒绝某用户访问；/P 用户名:perm 替换指定用户的访问权限；/G 用户名:perm 赋予指定用户访问权限；Perm 可以是: N 无，R 读取， W 写入， C 更改(写入)，F 完全控制；例：<span class="built_in">cacls</span> D:\test.txt /D pub 设定d:\test.txt拒绝pub用户访问。 </div><div class="line"><span class="built_in">cacls</span> 文件名 查看文件的访问用户权限列表 </div><div class="line"><span class="comment">REM 文本内容 在批处理文件中添加注解 </span></div><div class="line">netsh 查看或更改本地网络配置情况</div></pre></td></tr></table></figure>

        
        
        <p class="article-more-link">
          
       </p>
    </div>
    <footer class="article-footer clearfix">
<div class="article-catetags">


  <div class="article-tags">
  
  <span></span> <a href="/tags/doc命令/">doc命令</a>
  </div>

</div>




<div class="comments-count">
	
	  	<span></span>
		<a href="/2016/04/22/doc/#comments" class="ds-thread-count comments-count-link" data-thread-key="2016/04/22/doc/" data-count-type="comments">&nbsp;</a>
	
</div>

</footer>


    </article>






   
    
    <article class="post-expand post" itemprop="articleBody"> 
        <header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/2016/04/22/winver/" title="计算机运行命令全集 winver" itemprop="url">计算机运行命令全集 winver</a>
  </h1>
  <p class="article-author">By
       
		<a href="/about" title="linyu" target="_blank" itemprop="author">linyu</a>
		
  <p class="article-time">
    <time datetime="2016-04-22T06:05:42.000Z" itemprop="datePublished"> 發表於 2016-04-22</time>
    
  </p>
</header>
    <div class="article-content">
        
        <figure class="highlight livecodeserver"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div><div class="line">34</div><div class="line">35</div><div class="line">36</div><div class="line">37</div><div class="line">38</div><div class="line">39</div><div class="line">40</div><div class="line">41</div><div class="line">42</div><div class="line">43</div><div class="line">44</div><div class="line">45</div><div class="line">46</div><div class="line">47</div><div class="line">48</div><div class="line">49</div><div class="line">50</div><div class="line">51</div><div class="line">52</div><div class="line">53</div><div class="line">54</div><div class="line">55</div><div class="line">56</div><div class="line">57</div><div class="line">58</div><div class="line">59</div><div class="line">60</div><div class="line">61</div><div class="line">62</div><div class="line">63</div><div class="line">64</div><div class="line">65</div><div class="line">66</div><div class="line">67</div><div class="line">68</div><div class="line">69</div><div class="line">70</div><div class="line">71</div><div class="line">72</div><div class="line">73</div><div class="line">74</div><div class="line">75</div><div class="line">76</div><div class="line">77</div><div class="line">78</div><div class="line">79</div><div class="line">80</div><div class="line">81</div><div class="line">82</div></pre></td><td class="code"><pre><div class="line">wmimgmt.msc<span class="comment">----打开windows管理体系结构 </span></div><div class="line">wupdmgr<span class="comment">--------windows更新程序 </span></div><div class="line">winver<span class="comment">---------检查Windows版本 </span></div><div class="line">wmimgmt.msc<span class="comment">----打开windows管理体系结构 </span></div><div class="line">wupdmgr<span class="comment">--------windows更新程序 </span></div><div class="line">wscript<span class="comment">--------windows脚本宿主设置 </span></div><div class="line"><span class="built_in">write</span><span class="comment">----------写字板winmsd-----系统信息 </span></div><div class="line">wiaacmgr<span class="comment">-------扫描仪和照相机向导 </span></div><div class="line">winchat<span class="comment">--------XP自带局域网聊天 </span></div><div class="line">mem.exe<span class="comment">--------显示内存使用情况 </span></div><div class="line">Msconfig.exe<span class="comment">---系统配置实用程序 </span></div><div class="line">mplayer2<span class="comment">-------简易widnows media player </span></div><div class="line">mspaint<span class="comment">--------画图板 </span></div><div class="line">mstsc<span class="comment">----------远程桌面连接 </span></div><div class="line">mplayer2<span class="comment">-------媒体播放机 </span></div><div class="line">magnify<span class="comment">--------放大镜实用程序 </span></div><div class="line">mmc<span class="comment">------------打开控制台 </span></div><div class="line">mobsync<span class="comment">--------同步命令 </span></div><div class="line">dxdiag<span class="comment">---------检查DirectX信息 </span></div><div class="line">drwtsn32<span class="comment">------ 系统医生 </span></div><div class="line">devmgmt.msc<span class="comment">--- 设备管理器 </span></div><div class="line">dfrg.msc<span class="comment">-------磁盘碎片整理程序 </span></div><div class="line">diskmgmt.msc<span class="comment">---磁盘管理实用程序 </span></div><div class="line">dcomcnfg<span class="comment">-------打开系统组件服务 </span></div><div class="line">ddeshare<span class="comment">-------打开DDE共享设置 </span></div><div class="line">dvdplay<span class="comment">--------DVD播放器 </span></div><div class="line">net <span class="built_in">stop</span> messenger<span class="comment">-----停止信使服务 </span></div><div class="line">net <span class="built_in">start</span> messenger<span class="comment">----开始信使服务 </span></div><div class="line">notepad<span class="comment">--------打开记事本 </span></div><div class="line">nslookup<span class="comment">-------网络管理的工具向导 </span></div><div class="line">ntbackup<span class="comment">-------系统备份和还原 </span></div><div class="line">narrator<span class="comment">-------屏幕"讲述人" </span></div><div class="line">ntmsmgr.msc<span class="comment">----移动存储管理器 </span></div><div class="line">ntmsoprq.msc<span class="comment">---移动存储管理员操作请求 </span></div><div class="line">netstat -<span class="keyword">an</span><span class="comment">----(TC)命令检查接口 </span></div><div class="line">syncapp<span class="comment">--------创建一个公文包 </span></div><div class="line">sysedit<span class="comment">--------系统配置编辑器 </span></div><div class="line">sigverif<span class="comment">-------文件签名验证程序 </span></div><div class="line">sndrec32<span class="comment">-------录音机 </span></div><div class="line">shrpubw<span class="comment">--------创建共享文件夹 </span></div><div class="line">secpol.msc<span class="comment">-----本地安全策略 </span></div><div class="line">syskey<span class="comment">---------系统加密，一旦加密就不能解开，保护windows xp系统的双重密码 </span></div><div class="line">services.msc<span class="comment">---本地服务设置 </span></div><div class="line">Sndvol32<span class="comment">-------音量控制程序 </span></div><div class="line">sfc.exe<span class="comment">--------系统文件检查器 </span></div><div class="line">sfc /scannow<span class="comment">---windows文件保护 </span></div><div class="line">tsshutdn<span class="comment">-------60秒倒计时关机命令 </span></div><div class="line">tourstart<span class="comment">------xp简介（安装完成后出现的漫游xp程序） </span></div><div class="line">taskmgr<span class="comment">--------任务管理器 </span></div><div class="line">eventvwr<span class="comment">-------事件查看器 </span></div><div class="line">eudcedit<span class="comment">-------造字程序 </span></div><div class="line">explorer<span class="comment">-------打开资源管理器 </span></div><div class="line">packager<span class="comment">-------对象包装程序 </span></div><div class="line">perfmon.msc<span class="comment">----计算机性能监测程序 </span></div><div class="line">progman<span class="comment">--------程序管理器 </span></div><div class="line">regedit.exe<span class="comment">----注册表 </span></div><div class="line">rsop.msc<span class="comment">-------组策略结果集 </span></div><div class="line">regedt32<span class="comment">-------注册表编辑器 </span></div><div class="line">rononce -p <span class="comment">----15秒关机 </span></div><div class="line">regsvr32 /u *.dll<span class="comment">----停止dll文件运行 </span></div><div class="line">regsvr32 /u zipfldr.dll<span class="comment">------取消ZIP支持 </span></div><div class="line">cmd.exe<span class="comment">--------CMD命令提示符 </span></div><div class="line">chkdsk.exe<span class="comment">-----Chkdsk磁盘检查 </span></div><div class="line">certmgr.msc<span class="comment">----证书管理实用程序 </span></div><div class="line">calc<span class="comment">-----------启动计算器 </span></div><div class="line">charmap<span class="comment">--------启动字符映射表 </span></div><div class="line">cliconfg<span class="comment">-------SQL SERVER 客户端网络实用程序 </span></div><div class="line">Clipbrd<span class="comment">--------剪贴板查看器 </span></div><div class="line">conf<span class="comment">-----------启动netmeeting </span></div><div class="line">compmgmt.msc<span class="comment">---计算机管理 </span></div><div class="line">cleanmgr<span class="comment">-------**整理 </span></div><div class="line">ciadv.msc<span class="comment">------索引服务程序 </span></div><div class="line">osk<span class="comment">------------打开屏幕键盘 </span></div><div class="line">odbcad32<span class="comment">-------ODBC数据源管理器 </span></div><div class="line">oobe/msoobe /<span class="keyword">a</span><span class="comment">----检查XP是否激活 </span></div><div class="line">lusrmgr.msc<span class="comment">----本机用户和组 </span></div><div class="line">logoff<span class="comment">---------注销命令 </span></div><div class="line">iexpress<span class="comment">-------木马捆绑工具，系统自带 </span></div><div class="line">Nslookup<span class="comment">-------IP地址侦测器 </span></div><div class="line">fsmgmt.msc<span class="comment">-----共享文件夹管理器 </span></div><div class="line">utilman<span class="comment">--------辅助工具管理器 </span></div><div class="line">gpedit.msc<span class="comment">-----组策略</span></div></pre></td></tr></table></figure>

        
        
        <p class="article-more-link">
          
       </p>
    </div>
    <footer class="article-footer clearfix">
<div class="article-catetags">


  <div class="article-tags">
  
  <span></span> <a href="/tags/doc命令/">doc命令</a>
  </div>

</div>




<div class="comments-count">
	
	  	<span></span>
		<a href="/2016/04/22/winver/#comments" class="ds-thread-count comments-count-link" data-thread-key="2016/04/22/winver/" data-count-type="comments">&nbsp;</a>
	
</div>

</footer>


    </article>






   
    
    <article class="post-expand post" itemprop="articleBody"> 
        <header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/2016/04/22/npm/" title="npm" itemprop="url">npm</a>
  </h1>
  <p class="article-author">By
       
		<a href="/about" title="linyu" target="_blank" itemprop="author">linyu</a>
		
  <p class="article-time">
    <time datetime="2016-04-22T03:06:16.000Z" itemprop="datePublished"> 發表於 2016-04-22</time>
    
  </p>
</header>
    <div class="article-content">
        
        <h3 id="npm使用"><a href="#npm使用" class="headerlink" title="npm使用"></a>npm使用</h3><blockquote>
<p>设置国内代理<br><figure class="highlight gams"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">npm config <span class="keyword">set</span> registry <span class="comment">https:</span>//<span class="comment">registry.npm.taobao.org</span></div><div class="line">npm <span class="comment">install -g cnpm --registry=https:</span>//<span class="comment">registry.npm.taobao.org</span></div></pre></td></tr></table></figure></p>
</blockquote>
<hr>
<blockquote>
<p>Window使用</p>
<ol>
<li><p>npm作为一个NodeJS的模块管理，之前我由于没有系统地看资料所以导致安装配置模块的时候走了一大段弯路，所以现在很有必要列出来记录下。我们要先配置npm的全局模块的存放路径以及cache的路径，例如我希望将以上两个文件夹放在NodeJS的主目录下，便在NodeJs下建立“node_global”及“node_cache”两个文件夹。我们就在cmd中键入两行命令：</p>
<figure class="highlight routeros"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">npm<span class="built_in"> config </span><span class="builtin-name">set</span><span class="built_in"> prefix </span><span class="string">"D:\develop\nodejs\node_global"</span></div><div class="line">npm<span class="built_in"> config </span><span class="builtin-name">set</span> cache <span class="string">"D:\develop\nodejs\node_cache"</span></div></pre></td></tr></table></figure>
</li>
<li><p>下面这一步非常关键，我们需要设置系统变量。进入我的电脑→属性→高级→环境变量。在系统变量下新建“NODE_PATH”,输入“D:\develop\nodejs\node_global\node_modules”</p>
</li>
<li>由于改变了module的默认地址，所以用户变量都要跟着改变一下（用户变量PATH修改为刚才我们设置的全局模块存放路径），要不使用module的时候会导致输入命令出现“xxx不是内部或外部命令，也不是可运行的程序或批处理文件”这个错误。我使用的全局模块存放路径为D:\develop\nodejs\node-global（见上方设置的prefix值）， 我将它添加到我的变量PATH里面</li>
</ol>
</blockquote>
<hr>
<blockquote>
<p>Linux使用</p>
<ul>
<li>设置环境变量<figure class="highlight routeros"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">vim /etc<span class="built_in">/profile </span></div><div class="line"><span class="builtin-name">export</span> <span class="attribute">PATH</span>=<span class="string">"<span class="variable">$PATH</span>:/home/linyu/soft/node-v5.10.1-linux-x86/bin"</span></div><div class="line">source /etc<span class="built_in">/profile </span> #设置生效</div></pre></td></tr></table></figure>
</li>
</ul>
</blockquote>

        
        
        <p class="article-more-link">
          
       </p>
    </div>
    <footer class="article-footer clearfix">
<div class="article-catetags">


  <div class="article-tags">
  
  <span></span> <a href="/tags/nodejs/">nodejs</a><a href="/tags/npm/">npm</a>
  </div>

</div>




<div class="comments-count">
	
	  	<span></span>
		<a href="/2016/04/22/npm/#comments" class="ds-thread-count comments-count-link" data-thread-key="2016/04/22/npm/" data-count-type="comments">&nbsp;</a>
	
</div>

</footer>


    </article>






   
    
    <article class="post-expand post" itemprop="articleBody"> 
        <header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/2016/04/21/mysql-setup/" title="解压版mysql安装" itemprop="url">解压版mysql安装</a>
  </h1>
  <p class="article-author">By
       
		<a href="/about" title="linyu" target="_blank" itemprop="author">linyu</a>
		
  <p class="article-time">
    <time datetime="2016-04-21T06:52:12.000Z" itemprop="datePublished"> 發表於 2016-04-21</time>
    
  </p>
</header>
    <div class="article-content">
        
        <h3 id="环境配置"><a href="#环境配置" class="headerlink" title="环境配置"></a>环境配置</h3><blockquote>
<p>MYSQL_HOME=D:\develop\database\mysql-5.6.20-winx64\bin</p>
</blockquote>
<h3 id="mysql-ini"><a href="#mysql-ini" class="headerlink" title="mysql.ini"></a>mysql.ini</h3><figure class="highlight routeros"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div></pre></td><td class="code"><pre><div class="line">[mysqld]</div><div class="line">设置字符集为utf8</div><div class="line">loose-default-character-<span class="builtin-name">set</span> = utf8</div><div class="line">character-set-server = utf8</div><div class="line">basedir = F:/mysql/mysql-5.6.20-winx64</div><div class="line">datadir = F:/mysql/mysql-5.6.20-winx64/data </div><div class="line"></div><div class="line">[client]</div><div class="line"><span class="comment">#设置客户端字符集环境 </span></div><div class="line">loose-default-character-<span class="builtin-name">set</span> = utf8</div><div class="line"></div><div class="line">[WinMySQLadmin]</div><div class="line">Server = F:/mysql/mysql-5.6.20-winx64/bin/mysqld.exe</div></pre></td></tr></table></figure>
<h3 id="添加为系统服务"><a href="#添加为系统服务" class="headerlink" title="添加为系统服务"></a>添加为系统服务</h3><figure class="highlight cmake"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">mysqld -<span class="keyword">install</span> <span class="comment">#进入mysql bin目录启动命令</span></div><div class="line">mysqld -<span class="keyword">remove</span> <span class="comment">#删除服务</span></div><div class="line">sc delete mysql <span class="comment">#删除服务</span></div></pre></td></tr></table></figure>
<hr>
<h3 id="修改密码"><a href="#修改密码" class="headerlink" title="修改密码"></a>修改密码</h3><figure class="highlight sql"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line"><span class="keyword">update</span> mysql.user <span class="keyword">set</span> <span class="keyword">password</span>=<span class="keyword">PASSWORD</span>(<span class="string">'root'</span>) <span class="keyword">where</span> <span class="keyword">User</span>=<span class="string">'root'</span> </div><div class="line"><span class="keyword">flush</span> <span class="keyword">privileges</span></div></pre></td></tr></table></figure>
<h5 id="mysql解决远程不能访问的方法"><a href="#mysql解决远程不能访问的方法" class="headerlink" title="mysql解决远程不能访问的方法"></a>mysql解决远程不能访问的方法</h5><figure class="highlight sql"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line"><span class="keyword">GRANT</span> ALL <span class="keyword">PRIVILEGES</span> <span class="keyword">ON</span> *.* <span class="keyword">TO</span> <span class="string">'myuser'</span>@<span class="string">'%'</span> <span class="keyword">IDENTIFIED</span> <span class="keyword">BY</span> <span class="string">'mypassword'</span> <span class="keyword">WITH</span> <span class="keyword">GRANT</span> <span class="keyword">OPTION</span>;</div></pre></td></tr></table></figure>

        
        
        <p class="article-more-link">
          
       </p>
    </div>
    <footer class="article-footer clearfix">
<div class="article-catetags">


  <div class="article-tags">
  
  <span></span> <a href="/tags/mysql/">mysql</a><a href="/tags/database/">database</a>
  </div>

</div>




<div class="comments-count">
	
	  	<span></span>
		<a href="/2016/04/21/mysql-setup/#comments" class="ds-thread-count comments-count-link" data-thread-key="2016/04/21/mysql-setup/" data-count-type="comments">&nbsp;</a>
	
</div>

</footer>


    </article>







  <nav id="page-nav" class="clearfix">
    <a class="extend prev" rel="prev" href="/page/4/"><span></span>Prev</a><a class="page-number" href="/">1</a><span class="space">&hellip;</span><a class="page-number" href="/page/3/">3</a><a class="page-number" href="/page/4/">4</a><span class="page-number current">5</span><a class="page-number" href="/page/6/">6</a><a class="extend next" rel="next" href="/page/6/">Next<span></span></a>
  </nav>

</div>
      <div class="openaside"><a class="navbutton" href="#" title="顯示側邊欄"></a></div>

<div id="asidepart">
<div class="closeaside"><a class="closebutton" href="#" title="隱藏側邊欄"></a></div>
<aside class="clearfix">

  
<div class="github-card">
<p class="asidetitle">Github 名片</p>
<div class="github-card" data-github="bigsuperangel" data-width="220" data-height="119" data-theme="medium">
<script type="text/javascript" src="//cdn.jsdelivr.net/github-cards/latest/widget.js" ></script>
</div>
  </div>



  

  
<div class="tagslist">
	<p class="asidetitle">標簽</p>
		<ul class="clearfix">
		
			
				<li><a href="/tags/linux/" title="linux">linux<sup>16</sup></a></li>
			
		
			
				<li><a href="/tags/ubuntu/" title="ubuntu">ubuntu<sup>11</sup></a></li>
			
		
			
				<li><a href="/tags/java/" title="java">java<sup>10</sup></a></li>
			
		
			
				<li><a href="/tags/maven/" title="maven">maven<sup>7</sup></a></li>
			
		
			
				<li><a href="/tags/mysql/" title="mysql">mysql<sup>4</sup></a></li>
			
		
			
				<li><a href="/tags/python/" title="python">python<sup>3</sup></a></li>
			
		
			
				<li><a href="/tags/tomcat/" title="tomcat">tomcat<sup>3</sup></a></li>
			
		
			
				<li><a href="/tags/alsamixer/" title="alsamixer">alsamixer<sup>2</sup></a></li>
			
		
			
				<li><a href="/tags/git/" title="git">git<sup>2</sup></a></li>
			
		
			
				<li><a href="/tags/hexo/" title="hexo">hexo<sup>2</sup></a></li>
			
		
			
				<li><a href="/tags/command/" title="command">command<sup>2</sup></a></li>
			
		
			
				<li><a href="/tags/eclipse/" title="eclipse">eclipse<sup>2</sup></a></li>
			
		
			
				<li><a href="/tags/doc命令/" title="doc命令">doc命令<sup>2</sup></a></li>
			
		
			
				<li><a href="/tags/database/" title="database">database<sup>2</sup></a></li>
			
		
			
				<li><a href="/tags/nodejs/" title="nodejs">nodejs<sup>2</sup></a></li>
			
		
			
				<li><a href="/tags/freenom/" title="freenom">freenom<sup>1</sup></a></li>
			
		
			
				<li><a href="/tags/gradle/" title="gradle">gradle<sup>1</sup></a></li>
			
		
			
				<li><a href="/tags/ignore/" title="ignore">ignore<sup>1</sup></a></li>
			
		
			
				<li><a href="/tags/security/" title="security">security<sup>1</sup></a></li>
			
		
			
				<li><a href="/tags/jitpack/" title="jitpack">jitpack<sup>1</sup></a></li>
			
		
		</ul>
</div>


  <div class="linkslist">
  <p class="asidetitle">友情鏈接</p>
    <ul>
        
          <li>
            
            	<a href="https://www.oschina.net" target="_blank" title="开源中国">开源中国</a>
            
          </li>
        
          <li>
            
            	<a href="http://stackoverflow.com" target="_blank" title="stackoverflow">stackoverflow</a>
            
          </li>
        
    </ul>
</div>

  


  <div class="rsspart">
	<a href="/atom.xml" target="_blank" title="rss">RSS 訂閱</a>
</div>

  <div class="weiboshow">
  <p class="asidetitle">新浪微博</p>
    <iframe width="100%" height="119" class="share_self"  frameborder="0" scrolling="no" src="http://widget.weibo.com/weiboshow/index.php?language=&width=0&height=119&fansRow=2&ptype=1&speed=0&skin=9&isTitle=1&noborder=1&isWeibo=0&isFans=0&uid=null&verifier=&dpc=1"></iframe>
</div>


</aside>
</div>
    </div>
    <footer><div id="footer" >
	
	<div class="line">
		<span></span>
		<div class="author"></div>
	</div>
	
	
	<section class="info">
		<p> 知行合一 <br/>
			This is my blog,believe it or not.</p>
	</section>
	 
	<div class="social-font" class="clearfix">
		
		
		<a href="https://github.com/bigsuperangel" target="_blank" class="icon-github" title="github"></a>
		
		
		
		
		
		
		
		
		
		<a href="mailto:bigsuperangel@gmail.com" target="_blank" class="icon-email" title="Email Me"></a>
		
	</div>
			
		

		<p class="copyright">
		Powered by <a href="http://hexo.io" target="_blank" title="hexo">hexo</a> and Theme by <a href="https://github.com/wuchong/jacman" target="_blank" title="Jacman">Jacman</a> © 2019 
		
		<a href="/about" target="_blank" title="linyu">linyu</a>
		
		
		</p>
</div>
</footer>
    <script src="/js/jquery-2.0.3.min.js"></script>
<script src="/js/jquery.imagesloaded.min.js"></script>
<script src="/js/gallery.js"></script>
<script src="/js/jquery.qrcode-0.12.0.min.js"></script>

<script type="text/javascript">
$(document).ready(function(){ 
  $('.navbar').click(function(){
    $('header nav').toggleClass('shownav');
  });
  var myWidth = 0;
  function getSize(){
    if( typeof( window.innerWidth ) == 'number' ) {
      myWidth = window.innerWidth;
    } else if( document.documentElement && document.documentElement.clientWidth) {
      myWidth = document.documentElement.clientWidth;
    };
  };
  var m = $('#main'),
      a = $('#asidepart'),
      c = $('.closeaside'),
      o = $('.openaside');
  c.click(function(){
    a.addClass('fadeOut').css('display', 'none');
    o.css('display', 'block').addClass('fadeIn');
    m.addClass('moveMain');
  });
  o.click(function(){
    o.css('display', 'none').removeClass('beforeFadeIn');
    a.css('display', 'block').removeClass('fadeOut').addClass('fadeIn');      
    m.removeClass('moveMain');
  });
  $(window).scroll(function(){
    o.css("top",Math.max(80,260-$(this).scrollTop()));
  });
  
  $(window).resize(function(){
    getSize(); 
    if (myWidth >= 1024) {
      $('header nav').removeClass('shownav');
    }else{
      m.removeClass('moveMain');
      a.css('display', 'block').removeClass('fadeOut');
      o.css('display', 'none');
        
    }
  });
});
</script>










<link rel="stylesheet" href="/fancybox/jquery.fancybox.css" media="screen" type="text/css">
<script src="/fancybox/jquery.fancybox.pack.js"></script>
<script type="text/javascript">
$(document).ready(function(){ 
  $('.article-content').each(function(i){
    $(this).find('img').each(function(){
      if ($(this).parent().hasClass('fancybox')) return;
      var alt = this.alt;
      if (alt) $(this).after('<span class="caption">' + alt + '</span>');
      $(this).wrap('<a href="' + this.src + '" title="' + alt + '" class="fancybox"></a>');
    });
    $(this).find('.fancybox').each(function(){
      $(this).attr('rel', 'article' + i);
    });
  });
  if($.fancybox){
    $('.fancybox').fancybox();
  }
}); 
</script>



<!-- Analytics Begin -->

<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-84488915-1', 'bigsuperangel.github.io');  
ga('send', 'pageview');
</script>





<!-- Analytics End -->

<!-- Totop Begin -->

	<div id="totop">
	<a title="返回頂部"><img src="/img/scrollup.png"/></a>
	</div>
	<script src="/js/totop.js"></script>

<!-- Totop End -->

<!-- MathJax Begin -->
<!-- mathjax config similar to math.stackexchange -->


<!-- MathJax End -->

<!-- Tiny_search Begin -->

<!-- Tiny_search End -->

  </body>
 </html>
